package com.wzd.learn.springcloud.service.b.biz;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.wzd.learn.springcloud.service.b.biz.ref.HelloService;

@RestController
public class GoodByeService {
	@Resource
	private HelloService helloService;

	@GetMapping("/bye1")
	public String sayBye1(@RequestParam("name") String name) {
		System.out.println("request bye1:" + System.currentTimeMillis());
		String hello = helloService.sayHello1(name);

		return hello + "\n,Bye " + name + "!";
	}

	@GetMapping("/bye2")
	public String sayBye2(@RequestParam("name") String name) {
		System.out.println("request bye2:" + System.currentTimeMillis());

		String hello = helloService.sayHello2(name);
		return hello + "\n,Bye " + name + "!";
	}
}
